home *** CD-ROM | disk | FTP | other *** search
- Path: res.com!usenet
- From: danlynes@res.com
- Newsgroups: comp.lang.c
- Subject: Re: The size of a file
- Date: 30 Jan 1996 03:19:15 GMT
- Organization: RES Online
- Message-ID: <4ek2nj$1li@clare.res.com>
- References: <4ebc03$4gv@gate.compart.fi> <4edo88$4c7@news.xs4all.nl> <4ej9mr$fh5@noc.tor.hookup.net>
- Reply-To: danlynes@res.com
- NNTP-Posting-Host: di017.res.com
- X-Newsreader: IBM NewsReader/2 v1.2.5
-
- In <4ej9mr$fh5@noc.tor.hookup.net>, Richard Steadman <rsteadma@mmltd.com> writes:
-
- >>f=fopen()
- >>fseek(f,SEEK_END,0)
- >>ftell(f)
- >>fclose(f)
- >>
- >>done
- >>--
- >
- >But what if the file size doesn't fit in a long int (in DOS)? It
- >seems that a long int (which ftell() returns) only goes up to 2 meg.
-
- Correction. 2Gb. However, don't assume a long int is 32 bits. Under
- a 64-bit RISC compiler, a long int is 64 bits, in which case, it can
- access up to a 4.2 * 10**18 byte file. Which, should be enough to
- satisfy any byte hog. At least in the next couple of years, anyways.
-
- +------------------------------------------------------+
- ! OS/2 - The Champion of Operating Systems !
- ! Enitharmon/2 - A Powerful BBS Package !
- ! What a great pair! danlynes@res.com !
- ! www.res.com/~danlynes/index.html !
- ! www.res.com/~danlynes/Enitharmon!2/index.html !
- ! The Enitharmon Beta project is now under way. !
- ! To subscribe to the mailing list, send e-mail to !
- ! danlynes@res.com or daniel.lynes@ideasnet.com !
- +------------------------------------------------------+
-
-